package designpatterns.prototype;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2022/1/29 8:54
 */
public class AppTest {

    private static final Logger logger = LoggerFactory.getLogger(AppTest.class);

    @Test
    public void test() {

        ShapeCache.loadCache();

        Shape clonedShape = ShapeCache.getShape("1");
        logger.info("Shape : " + clonedShape.getType());

        Shape clonedShape2 = ShapeCache.getShape("2");
        logger.info("Shape : " + clonedShape2.getType());

        Shape clonedShape3 = ShapeCache.getShape("3");
        logger.info("Shape : " + clonedShape3.getType());

    }

}
